#ifndef SPLINTER_POLYNOMIAL_H
#define SPLINTER_POLYNOMIAL_H

#include "definitions.h"

#include <string>

namespace SPLINTER
{
    class Polynomial
    {
    private:
        /* data */
        DenseVector coefficients;

    public:
        Polynomial();
        Polynomial(int degree, ...);
        Polynomial(const DenseVector &coefficients);
        ~Polynomial();
        size_t degree() const;
        const DenseVector &getCoefficients();
        double operator()(double x) const;
        Polynomial operator+(const Polynomial &that);
        Polynomial operator-(const Polynomial &that);
        Polynomial operator*(const Polynomial &that);
        Polynomial operator*(double alpha);
        Polynomial derivation();
        std::string to_string();
        std::string to_string() const;
    };

}

#endif // SPLINTER_POLYNOMIAL_H